package com.glp.work.flow.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 流程审批DTO
 *
 * @author jhuang1
 */
@Data
public class OrderApprovalDTO implements Serializable {

    private static final long serialVersionUID = 1972979060544798169L;

    /**
     * 当前任务ID
     */
    @ApiModelProperty(value = "当前任务ID,不能为空！")
    @NotBlank(message = "当前任务ID,不能为空！")
    private String taskId;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private String userNo;
    private String processId;

    /**
     * 审批操作
     */
    @ApiModelProperty(value = "审批操作,不能为空！PASS:审批通过 / FAIL:审批不通过 / REJECT:审批驳回 /REJECT_TO_UP:驳回上一岗 ")
    @NotBlank(message = "审批操作,不能为空！PASS:审批通过 / FAIL:审批不通过 / REJECT:审批驳回 / REJECT_TO_UP:驳回上一岗")
    private String result;

    /**
     * 评论意见
     */
    @ApiModelProperty(value = "评论意见")
    private String comment;

    /**
     * 流程参数Map
     */
    @ApiModelProperty(value = "流程参数Map")
    private Map<String, Object> processVariable;

    /**
     * 表单数据Map
     */
    @ApiModelProperty(value = "表单数据Map")
    private Map<String, Object> formData;

    @ApiModelProperty(value = "动态分配用户集合")
    private List<String> userNos;

    @ApiModelProperty(value = "手写签字数据")
    private Map<String,String> handWritingSignatureData;

    @ApiModelProperty(value = "跳转到任务的节点id")
    private String targetActivityId;

    @ApiModelProperty(value = "动态分配业务范围")
    private String businessScopebCode;

    @ApiModelProperty(value = "验证码")
    String yzm;

    public String getComment() {
        if (comment == null) {
            return "";
        }
        return comment;
    }
}
